#include <stdio.h>
#include <unistd.h>
#include <stdlib.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <string.h>
int main()
{
  printf("hello");
  fprintf(stderr,"err");
  mode_t mode=0666;
int fd=open("file1.txt",O_WRONLY|O_CREAT,mode);
char buff[1024]="hello world";
write(fd,buff,strlen(buff));
close(fd);
  return 0;
}
